package com.rabbit.eap.framework.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @projectName eap
 * @packageName com.rabbit.eap.config
 * @className MybatisPlusConfig
 * @author： rabbit
 * @version： 1.0
 * @since： 2020/4/27 21:29
 * <p>Description: MybatisPlusConfig
 * MybatisPlus配置
 * </p>

 */
@EnableTransactionManagement
@Configuration
@MapperScan("com.rabbit.eap.**.mapper")
public class MybatisPlusConfig {
    /**
     * mybatis-plus分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        return paginationInterceptor;
    }
}
